import requests

def get_headers():
    #发送登录请求
    resp=requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                       json={"mobile":"13800000002","password":"123456"})
    #组装token
    ihrm_token=f"Bearer {resp.json().get('data')}"
    #组装headers
    headers={"Authorization":ihrm_token}
    return headers

if __name__ == '__main__':
    print(get_headers())
